package cn.liontalk.SinglePattern;

public class SafeSingleTon {


    private SafeSingleTon() {
    }

    private static volatile SafeSingleTon safeSingleTon;

    public SafeSingleTon getInstance() {
        if (null == safeSingleTon) {
            synchronized (SafeSingleTon.class) {
                if (null == safeSingleTon) {
                    safeSingleTon = new SafeSingleTon();
                }
            }
        }
        return safeSingleTon;
    }

}
